<template>
	<view class="content">
		<image :src="baseUrl+'team_beijing_1.jpg?v=1.7'" class="team" />
		<uni-swiper-dot :info="specialSwiper.info" :current="specialSwiper.current" :mode="specialSwiper.mode"
			:dots-styles="specialSwiper.dotsStyles">
			<swiper class="specialSwiperBox" @change="change" autoplay="true" :interval="3000" :duration="1000" circular="true">
				<swiper-item class="specialSwiper-item" v-for="(item,index) in specialSwiper.info" :key="index">
					<image :src="item" class="specialItemImg"></image>
				</swiper-item>
			</swiper>
		</uni-swiper-dot>
		<image :src="baseUrl+'qrcode_beijing_1.png?v=1.7'" class="qrcode" show-menu-by-longpress="true"/>
		<!-- <view class="menu1" @click="$navto.navto('/user/huoke/huoke')"></view>
		<view class="menu2" @click="openCustomerServiceChat()"></view>
		<view class="menu3" @click="openCustomerServiceChat()"></view>
		<view class="menu4" @click="openCustomerServiceChat()"></view> -->
	</view>
</template>

<script>
	import Cache from '@/utils/cache'
	import {
		baseURL,
		basePath
	} from '@/config/app'
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	import {
		INVITE_CODE
	} from '@/config/cachekey'
	export default {
		data() {
			return {
				baseUrl: `https://cdn.zkjialan.com/img/team/`,
				specialSwiper: {
					current: 0,
					mode: 'round',
					dotsStyles: {
						bottom: 10,
						border: '',
						backgroundColor: 'grey',
						selectedBackgroundColor: '#000',
						selectedBorder: ''
					},
					info: ['https://cdn.zkjialan.com/img/team/s1_1.png?v=1.7','https://cdn.zkjialan.com/img/team/s2_1.png?v=1.7','https://cdn.zkjialan.com/img/team/s3_1.png?v=1.7','https://cdn.zkjialan.com/img/team/s4_1.png?v=1.7'],
				},
			}
		},
		methods: {
			...mapActions(['getUser']),
			change(e) { //改变轮播指示点
				this.specialSwiper.current = e.detail.current;
			},
		},
		computed: {},
		onLoad() {
			if (!this.isLogin) return this.$Router.push('/pages/login/login');
			if (uni.getLaunchOptionsSync().scene) { //来源场景
				Cache.set('scene', uni.getLaunchOptionsSync().scene)
			}
			if (uni.getLaunchOptionsSync().query.invite_code) { //获取邀请码
				Cache.set(INVITE_CODE, uni.getLaunchOptionsSync().query.invite_code)
			}
		},
		onShow() {
			console.log(1);
			if (!this.isLogin) return this.$Router.push('/pages/login/login');
			uni.hideHomeButton();
		}
	}
</script>

<style lang="scss" scoped>
	.specialSwiperBox {
		width: 600rpx;
		height: 280rpx;
		margin-left: 75rpx;
		margin-top: 600rpx;
		.specialSwiper-item {
			width: 600rpx !important;
			height: 223rpx !important;
			display: flex;
			flex-direction: column;
			.specialItemImg {
				width: 600rpx !important;
				height: 223rpx !important;
				// border-radius: 15rpx;
			}
		}
	}
	.qrcode{
		position: relative;
		margin-top: 40rpx;
		margin-left: 110rpx;
		width: 530rpx;
		height: 390rpx;
	}
	.menu4 {
		position: relative;
		width: 80%;
		height: 200rpx;
		margin-left: 10%;
		margin-top: 1950rpx;
		// background-color: red;
	}

	.menu3 {
		position: relative;
		width: 80%;
		height: 200rpx;
		margin-left: 10%;
		margin-top: 6350rpx;
		// background-color: red;
	}

	.menu2 {
		position: relative;
		width: 80%;
		height: 200rpx;
		margin-left: 10%;
		margin-top: 800rpx;
		// background-color: red;
	}

	.menu1 {
		position: relative;
		width: 40%;
		height: 212rpx;
		margin-left: 30%;
		margin-top: 668rpx;
		// background-color: red;
	}

	.team {
		position: absolute;
		width: 100%;
		height: 100vh;
	}

	.content {
		position: fixed;
		width: 100%;
		height: 100vh;
		background-color: #fff;
		overflow-y: scroll;
		// display: flex;
		// align-items: center;
		// justify-content: center;
	}

	page {
		width: 100%;
		height: 100vh;
		background-color: #fff;
		overflow-y: scroll;
	}
</style>